<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title></title>

<link href="/Public/dwz-ria/themes/default/style.css" rel="stylesheet" type="text/css" />
<link href="/Public/dwz-ria/themes/css/core.css" rel="stylesheet" type="text/css" />
<link href="/Public/dwz-ria/uploadify/css/uploadify.css" rel="stylesheet" type="text/css" />
<!--[if IE]>
<link href="/Public/dwz-ria/themes/css/ieHack.css" rel="stylesheet" type="text/css" />
<![endif]-->
<style type="text/css">
	#header{height:85px}
	#leftside, #container, #splitBar, #splitBarProxy{top:90px}
	input.text, input.title {
	width: 200px;
	padding: 2px;
	font-size: 1em;
	}
</style>

<script src="/Public/dwz-ria/javascripts/speedup.js" type="text/javascript"></script>
<script src="/Public/dwz-ria/javascripts/jquery-1.4.4.js" type="text/javascript"></script>
<script src="/Public/dwz-ria/javascripts/jquery.cookie.js" type="text/javascript"></script>
<script src="/Public/dwz-ria/javascripts/jquery.validate.js" type="text/javascript"></script>
<script src="/Public/dwz-ria/javascripts/jquery.bgiframe.js" type="text/javascript"></script>
<script src="/Public/dwz-ria/xheditor/xheditor-1.1.12-zh-cn.min.js" type="text/javascript"></script>
<script src="/Public/dwz-ria/uploadify/scripts/swfobject.js" type="text/javascript"></script>
<script src="/Public/dwz-ria/uploadify/scripts/jquery.uploadify.v2.1.0.js" type="text/javascript"></script>
<script type="text/javascript" src="/Public/js/lazyload.js"></script>


<script src="/Public/dwz-ria/bin/dwz.min.js" type="text/javascript"></script>
<script src="/Public/dwz-ria/javascripts/dwz.regional.zh.js" type="text/javascript"></script>
<!--<script type="text/javascript" src="/views/js/debug.js"></script>
--><script type="text/javascript">
function DrawImage(ImgD,iwidth,iheight){    
    //参数(图片,允许的宽度,允许的高度)    
    var image=new Image();    
    image.src=ImgD.src;    
    if(image.width>0 && image.height>0){    
      if(image.width/image.height>= iwidth/iheight){    
          if(image.width>iwidth){      
              ImgD.width=iwidth;    
              ImgD.height=(image.height*iwidth)/image.width;    
          }else{    
              ImgD.width=image.width;      
              ImgD.height=image.height;    
          }    
      }else{    
          if(image.height>iheight){      
              ImgD.height=iheight;    
              ImgD.width=(image.width*iheight)/image.height;            
          }else{    
              ImgD.width=image.width;      
              ImgD.height=image.height;    
          }    
      }    
    }    
}
function cata_del(id){
	alertMsg.confirm("您是否确定删除!",{
	okCall:function(){
		$.ajax({
			url: '__APP__/Catagories/del',
			data:'id='+id+'&tp='+new Date().getTime(),
			type: 'GET',
			dataType: 'text',
			timeout: 1000,
			error: function(){
				alert('Server Error');
			},
			success: function(data){
				if(data=='success'){
					navTab.reload('__APP__/Catagories/');
				}else if(data=='fail'){
					
				}
			}
		});
	}
	});
}
function sidebar_del(id){
	alertMsg.confirm("您是否确定删除!",{
	okCall:function(){
		$.ajax({
			url: '__APP__/SideBar/del',
			data:'id='+id+'&tp='+new Date().getTime(),
			type: 'GET',
			dataType: 'text',
			timeout: 1000,
			error: function(){
				alert('Server Error');
			},
			success: function(data){
				if(data=='success'){
					navTab.reload('__APP__/SideBar/');
				}else if(data=='fail'){
					
				}
			}
		});
	}
	});	
}
function setAttach(obj){
	if(obj.checked){
		$("#duty_input").show();
		$("#duty").addClass("required");
	}else{
		$("#duty").attr("value","");
		$("#duty").removeClass("required");
		$("#duty_input").hide();	
	}
}
function delUser(id,uname){
	alertMsg.confirm("您是否确定删除?",{
		okCall:function(){
			$.ajax({
			url:'__APP__/Users/udel',
			data:'uid='+id+'&uname='+uname+'&tp='+new Date().getTime(),
			type:'GET',
			error:function(){
				alert('Server Errors!');	
			},
			success:function(data){
				if(data=='success'){
						$("#user_"+id).remove();
				}else if(data=='Deny'){
						alert('你没有权限！');
				}else if(data=='DenyDel'){
						alert('管理员账号不能删除!');
				}
			}				
			});	
		}
	});
}
function del_Video(id){
	alertMsg.confirm("您是否确定删除?",{
		okCall:function(){
			$.ajax({
				url:'__APP__/Video/del',
				data:'id='+id,
				type:'GET',
				dataType:'text',
				error:function(){
				alert('Server Errors!');	
				},
				success:function(data){
					if(data=='success'){
						$("#arch_"+id).remove();
					}else if(data=='denny'){
						alert('你没有权限！');
					}
				}
				});	
		}
		});
}
function del_Page(id){
	alertMsg.confirm("您是否确定删除?",{
		okCall:function(){
			$.ajax({
				url:'__APP__/Page/del',
				data:'id='+id,
				type:'GET',
				dataType:'text',
				error:function(){
					alert('Server Errors!');	
				},
				success:function(data){
					if(data=='success'){
						$("#arch_"+id).remove();
					}else if(data=='denny'){
						alert('你没有权限！');
					}
				}
				});	
		}
	});
}
function del_archives(id,cid){
	alertMsg.confirm("您是否确定除?",{
	okCall:function(){
		$.ajax({
			url: '__APP__/Archives/del',
			data:'id='+id+'&tp='+new Date().getTime(),
			type: 'GET',
			dataType: 'text',
			error: function(){
				alert('Server Error');
			},
			success: function(data){
				if(data=='success'){
					$("#arch_"+id).remove();
					/*if(cid!=''){
					navTab.reload('__APP__/Archives/?id='+cid);
					}else{
						navTab.reload('__APP__/Archives/index');
					}*/
				}else if(data=='fail'){
					alert('删除不成功！');
				}else if(data=='denny'){
					alert('你没有权限！');	
				}
			}
		});
	}
	});	
}
function del_file(id){
	alertMsg.confirm("您是否确定删除!",{
	okCall:function(){
		$.ajax({
			url: '__APP__/Attachments/del',
			data:'id='+id+'&tp='+new Date().getTime(),
			type: 'GET',
			dataType: 'text',
			timeout: 1000,
			error: function(){
				alert('Server Error');
			},
			success: function(data){
				if(data=='success'){
					navTab.reload('__APP__/Attachments/');
				}else if(data=='fail'){
					
				}
			}
		});
	}
	});	
}

function changenav(id,nav,where,pid){
	$.ajax({
			url: '__APP__/Catagories/changenav',
			data:'id='+id+'&nav='+nav+'&tp='+new Date().getTime(),
			type: 'GET',
			dataType: 'text',
			timeout: 1000,
			error: function(){
				alert('Server Error');
			},
			success: function(data){
				if(data=='success'){
					if(where=="sub"){
					navTab.reload('__APP__/Catagories/subcata?id='+pid);
					}else{
						navTab.reload('__APP__/Catagories/');
					}
				}else if(data=='fail'){
					
				}
			}
		});	
}

function changeview(id,stat,where,pid){
	$.ajax({
			url: '__APP__/Catagories/changeview',
			data:'id='+id+'&stat='+stat+'&tp='+new Date().getTime(),
			type: 'GET',
			dataType: 'text',
			timeout: 1000,
			error: function(){
				alert('Server Error');
			},
			success: function(data){
				if(data=='success'){
					if(where=="sub"){
					navTab.reload('__APP__/Catagories/subcata?id='+pid);
					}else{
						navTab.reload('__APP__/Catagories/');
					}
				}else if(data=='fail'){
					
				}
			}
		});	
}
function remove_pic(){
	$("#imgpreview").html("请保存修改!");
	$("#imgurl").attr('value','');	
}
function spec_preview(v){
$('#specpreview').html('<img src="'+v+'" border="0" /> <a onclick="remove_pic()" href="javascript:void(0)">删除</a>');
$('#picurl').attr("value",v);	
}
function preview(v){
$('#imgpreview').html('<img src="'+v+'" border="0" /> <a onclick="remove_pic()" href="javascript:void(0)">删除</a>');
$('#imgurl').attr("value",v);	
}

</script>
<script type="text/javascript">
function fleshVerify(){
	//重载验证码
	$('#verifyImg').attr("src", '__APP__/Public/verify/'+new Date().getTime());
}
function dialogAjaxMenu(json){
	dialogAjaxDone(json);
	if (json.statusCode == DWZ.statusCode.ok){
		$("#sidebar").loadUrl("__APP__/Public/menu");
	}
}
function navTabAjaxMenu(json){
	navTabAjaxDone(json);
	if (json.statusCode == DWZ.statusCode.ok){
		$("#sidebar").loadUrl("__APP__/Public/menu");
	}
}
$(function(){
	DWZ.init("/Public/dwz-ria/dwz.frag.xml", {
		loginUrl:"/Public/dwz-ria/login.html",
		debug:false,
		callback:function(){
			initEnv();
		}
	});
});

//清理浏览器内存,只对IE起效，FF不需要
if ($.browser.msie) {
	window.setInterval("CollectGarbage();", 10000);
}
function setIcon(ext){
	var imgpath = '';
	if(ext=='doc'||ext=='docx'||ext=='gif'||ext=='xls'||ext=='xlsx'||ext=='pdf'||ext=='jpg'||ext=='epub'||ext=='ps'||ext=='ps'||ext=='eml'||ext=='xml'||ext=='txt'||ext=='psw'||ext=='pxl'||ext=='dps'||ext=='et'||ext=='wps'||ext=='png'||ext=='tif'||ext=='pub'||ext=='vsd'||ext=='pot'||ext=='potx'||ext=='bmp'||ext=='ppt'){
		imgpath = '/images/'+ext+'_46x35.gif';
	}else{
		imgpath = '/images/unknown_46x35.gif';
	}
	return imgpath;
}
//2012-08-08
function PreCols(obj){
	var i=0;
	var s='';
	var col_row = obj.options.length;
	for(;i<col_row;i++){
		if(obj.options[i].selected){
			s+=obj.options[i].value+',';
		}//end if 
	}//end for
	s=s.substr(0,s.length-1);//所选的栏目id
	if(s!=""){
		$.ajax({
			url:'/Admin/index.php/Catagories/preCols',
			type:'POST',
			data:'s='+s+'&tp='+new Date().getTime(),
			dataType:'text',
			success:function(data){
				
			}
		});
	}
	
}
//20120926

function SpecSet(){
	var html = '';
	var val=$('input:radio[name="spec_select"]:checked').val();
	var title = $('#spec_name_'+val).html();
	//先判断是否存在该规格
	//spec_id_tmp_
	
	if($('#spec_id_tmp_'+val)[0]){
		$.pdialog.closeCurrent();
		return false;
	}
	
            if(val==null){
                
               html = '';
            }else{
html = '<tr id="specset_row_'+val+'">    	<td><input type="hidden" name="spec_id[]" id="spec_id_tmp_'+val+'" value="'+val+'" /><span>'+title+'</span></td>        <td>        <select name="spec_type[]"><option selected="" value="flat">可筛选-平铺显示</option><option value="select">可筛选-下拉显示</option><option value="disabled">不作为筛选项</option></select>        </td>        <td><a onclick="delSpecSet(\''+val+'\')" href="javascript:void(0)">删除</a></td></tr>';	
		
	$('#spec_list').append(html);	
				
			}
			$.pdialog.closeCurrent();	
}

function delSpecSet(id){
	$('#specset_row_'+id).remove();
}

///
</script>

</head>

<body scroll="no">
	<div id="layout">
        
        <div id="header">
			<div class="headerNav">
				<a class="logo" href="/">标志</a>
				<ul class="nav">
					<li><a href="/index.php?s=/Admin/User/logout">退出</a></li>
				</ul>
				
			</div>
		
			<div id="navMenu">
				<ul>
                
					<li class="selected"><a href="/index.php?s=Admin/Menu/op"><span>日历管理</span></a></li>
					<li><a href="/index.php?s=Admin/Menu/content"><span>内容管理</span></a></li>
					<li><a href="/index.php?s=Admin/Menu/member"><span>会员管理</span></a></li>
					<li><a href="/index.php?s=Admin/Menu/systeman"><span>系统管理</span></a></li>
                    
					
				</ul>
			</div>
		</div>
		
		<div id="leftside">
			<div id="sidebar_s">
				<div class="collapse">
					<div class="toggleCollapse"><div></div></div>
				</div>
			</div>
			
			<div id="sidebar">
				<include file="./template/default/Admin/op.html" />
			</div>
		</div>

		<div id="container">
			<div id="navTab" class="tabsPage">
				<div class="tabsPageHeader">
					<div class="tabsPageHeaderContent"><!-- 显示左右控制时添加 class="tabsPageHeaderMargin" -->
						<ul class="navTab-tab">
							<li tabid="main" class="main"><a href="javascript:void(0)"><span><span class="home_icon">我的主页</span></span></a></li>
						</ul>
					</div>
					<div class="tabsLeft">left</div><!-- 禁用只需要添加一个样式 class="tabsLeft tabsLeftDisabled" -->
					<div class="tabsRight">right</div><!-- 禁用只需要添加一个样式 class="tabsRight tabsRightDisabled" -->
					<div class="tabsMore">more</div>
				</div>
				<ul class="tabsMoreList">
					<li><a href="javascript:void(0)">我的主页</a></li>
				</ul>
				<include file="./template/default/Admin/main.html" />
			</div>
		</div>

		<div id="taskbar" style="left:0px; display:none;">
			<div class="taskbarContent">
				<ul></ul>
			</div>
			<div class="taskbarLeft taskbarLeftDisabled" style="display:none;">taskbarLeft</div>
			<div class="taskbarRight" style="display:none;">taskbarRight</div>
		</div>
		<div id="splitBar"></div>
		<div id="splitBarProxy"></div>
	</div>
	
	<div id="footer">Copyright &copy; </div>

<!--拖动效果-->
	<div class="resizable"></div>
<!--阴影-->
	<div class="shadow" style="width:508px; top:148px; left:296px;">
		<div class="shadow_h">
			<div class="shadow_h_l"></div>
			<div class="shadow_h_r"></div>
			<div class="shadow_h_c"></div>
		</div>
		<div class="shadow_c">
			<div class="shadow_c_l" style="height:296px;"></div>
			<div class="shadow_c_r" style="height:296px;"></div>
			<div class="shadow_c_c" style="height:296px;"></div>
		</div>
		<div class="shadow_f">
			<div class="shadow_f_l"></div>
			<div class="shadow_f_r"></div>
			<div class="shadow_f_c"></div>
		</div>
	</div>
	<!--遮盖屏幕-->
	<div id="alertBackground" class="alertBackground"></div>
	<div id="dialogBackground" class="dialogBackground"></div>

	<div id='background' class='background'></div>
	<div id='progressBar' class='progressBar'>数据加载中，请稍等...</div>

</body>
</html>